//
//  RecordLayer.m
//  FrogDrying
//
//  Created by Le Thanh Hai on 4/12/13.
//  Copyright 2013 __MyCompanyName__. All rights reserved.
//

#import "RecordLayer.h"
#import "Global.h"

@implementation RecordLayer
+(CCScene *) scene
{
	// 'scene' is an autorelease object.
	CCScene *scene = [CCScene node];
	
	// 'layer' is an autorelease object.
	RecordLayer *layer = [RecordLayer node];
	
	// add layer as a child to scene
	[scene addChild: layer];
	
	// return the scene
	return scene;
}

-(id)init{
    if (self = [super init]) {
        ADD_BACKGROUND
        
        CGSize size = [[CCDirector sharedDirector] winSize];
        
        CCMenuItemFont *play = [CCMenuItemFont itemWithString:@"Record Screen" block:^(id sender) {
            
        }];
        
        play.color = ccRED;
        play.position = ccp(size.width*0.5, size.height*0.5);
        
        CCMenuItemFont *back = [CCMenuItemFont itemWithString:@"back" block:^(id sender) {
            [[CCDirector sharedDirector] popScene];
        }];
        
        back.color = ccRED;
        back.position = ccp(size.width*0.5, size.height*0.5 - 40);
        
        CCMenu *menu = [CCMenu menuWithItems:play, back, nil];
        menu.anchorPoint = CGPointZero;
        menu.position = CGPointZero;
        [self addChild:menu];
    }
    return self;
}
@end
